package book.ch3.Employee;

public class Employee {
	protected String name;
	protected double salary;
	protected double bonus;

	public Employee(String name) {
		this.name = name;
		initSalary();
	}

	protected void initSalary() {
		salary = 100;
		bonus = 10;
	}

	public String toString() {
		return "{" + "name='" + name + "'" + ",salary=" + salary + ",bonus="
				+ bonus + "}";
	}

	public static void main(String[] args) {
		Manager manager = new Manager("Jack");
		System.out.println(manager.toString());
	}
}

class Manager extends Employee {
	public Manager(String name) {
		super(name);
	}

	protected void initSalary() {
		salary = 500;
		bonus = 30;
	}
}